import { AppDataSource } from '../db/index'

export default defineNitroPlugin(async (nitroApp) => {
  try {
    await AppDataSource.initialize()
    console.log('数据库初始化成功')
  } catch (error) {
    console.log('数据库初始化报错')
    console.log(error)
  }
})
